package org.summer.lawyer.domain.bo.spuorderassign;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.github.linpeilie.annotations.AutoMapper;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;
import org.summer.common.mybatis.core.domain.BaseEntitySearch;
import org.summer.lawyer.domain.SpuOrderAssign;

import java.io.Serial;
import java.util.Date;

/**
 * 派单业务对象 spu_order_assign
 *
 * @author summer
 * @date 2024-06-27
 */
@Schema(title ="派单视图对象 spu_order_assign", description = "派单视图对象 spu_order_assign")
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = SpuOrderAssign.class, reverseConvertGenerate = false)
public class SpuOrderAssignBo extends BaseEntitySearch {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @Schema(title = "id", type = "Long", description = "主键ID")
    //@NotNull(message = "主键ID不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 订单ID
     */
    @Schema(title = "orderId", type = "Long", description = "订单ID")
    //@NotNull(message = "订单ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long orderId;

    /**
     * 用于追踪的订单编号
     */
    @Schema(title = "trackingNumber", type = "String", description = "用于追踪的订单编号")
    //@NotBlank(message = "用于追踪的订单编号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String trackingNumber;

    /**
     * 派单时间
     */
    @Schema(title = "dispatchTime", type = "Date", description = "派单时间")
    //@NotNull(message = "派单时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date dispatchTime;

    /**
     * 派单员ID
     */
    @Schema(title = "dispatchUserId", type = "Long", description = "派单员ID")
    //@NotNull(message = "派单员ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long dispatchUserId;

    /**
     * 派单员姓名
     */
    @Schema(title = "dispatchName", type = "String", description = "派单员姓名")
    //@NotBlank(message = "派单员姓名不能为空", groups = { AddGroup.class, EditGroup.class })
    private String dispatchName;

    /**
     * 状态（Pending=待处理，Processing=处理中(已分派，还没接单），Confirmed=已接单，Completed=处理完成，Returned=已退回）
     */
    @Schema(title = "dispatchStatus", type = "String", description = "状态（Pending=待处理，Processing=处理中(已分派，还没接单），Confirmed=已接单，Completed=处理完成，Returned=已退回）")
    //@NotBlank(message = "状态（Pending=待处理，Processing=处理中(已分派，还没接单），Confirmed=已接单，Completed=处理完成，Returned=已退回）不能为空", groups = { AddGroup.class, EditGroup.class })
    private String dispatchStatus;

    /**
     * 微信用户ID
     */
    @Schema(title = "wxUserId", type = "Long", description = "微信用户ID")
    //@NotNull(message = "微信用户ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long wxUserId;

    /**
     * 处理律师ID
     */
    @Schema(title = "lawyerId", type = "Long", description = "处理律师ID,已弃用")
    //@NotNull(message = "处理律师ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long lawyerId;

    /**
     * 处理律师姓名
     */
    @Schema(title = "lawyerName", type = "String", description = "处理律师姓名,已弃用")
    //@NotBlank(message = "处理律师姓名不能为空", groups = { AddGroup.class, EditGroup.class })
    private String lawyerName;

    /**
     * 处理律所ID
     */
    @Schema(title = "lawFirmId", type = "Long", description = "处理律所ID")
    //@NotNull(message = "处理律所ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long lawFirmId;

    /**
     * 处理律所名称
     */
    @Schema(title = "lawFirmName", type = "String", description = "处理律所名称")
    //@NotBlank(message = "处理律所名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String lawFirmName;

    /**
     * 处理律师头像
     */
    @Schema(title = "lawyerAvatar", type = "String", description = "处理律师头像")
    //@NotBlank(message = "处理律师头像不能为空", groups = { AddGroup.class, EditGroup.class })
    private String lawyerAvatar;

    /**
     * 开始处理时间
     */
    @Schema(title = "handleTime", type = "Date", description = "开始处理时间")
    //@NotNull(message = "开始处理时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date handleTime;

    /**
     * 处理截止日期
     */
    @Schema(title = "deadline", type = "Date", description = "处理截止日期")
    //@NotNull(message = "处理截止日期不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date deadline;

    /**
     * 是否超时（0没有超时，1已经超时）
     */
    @Schema(title = "overtime", type = "String", description = "是否超时（0没有超时，1已经超时）")
    //@NotBlank(message = "是否超时（0没有超时，1已经超时）不能为空", groups = { AddGroup.class, EditGroup.class })
    private String overtime;

    /**
     * 撤回时间
     */
    @Schema(title = "returnedTime", type = "Date", description = "撤回时间")
    //@NotNull(message = "撤回时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date returnedTime;

    /**
     * 撤回原因
     */
    @Schema(title = "returnedDesc", type = "String", description = "撤回原因")
    //@NotBlank(message = "撤回原因不能为空", groups = { AddGroup.class, EditGroup.class })
    private String returnedDesc;

    /**
     * 完成时间
     */
    @Schema(title = "completionTime", type = "Date", description = "完成时间")
    //@NotNull(message = "完成时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date completionTime;

    /**
     * 是否激活状态,同时只有一个派单处于激活状态（0已关闭，1激活状态）
     */
    @Schema(title = "active", type = "String", description = "是否激活状态,同时只有一个派单处于激活状态（0已关闭，1激活状态）")
    private String active;

    /**
     * 商品ID
     */
    @Schema(title = "spuId", type = "Long", description = "商品ID")
    //@NotNull(message = "商品ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long spuId;

    /**
     * 商品名称
     */
    @Schema(title = "spuName", type = "String", description = "商品名称")
    //@NotBlank(message = "商品名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String spuName;

    /**
     * 商品分类ID
     */
    @Schema(title = "categoryId", type = "Long", description = "商品分类ID")
    //@NotNull(message = "商品分类ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long categoryId;

    /**
     * 商品分类名称
     */
    @Schema(title = "categoryName", type = "String", description = "商品分类名称")
    //@NotBlank(message = "商品分类名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String categoryName;

    /**
     * 商品主图片
     */
    @Schema(title = "spuImage", type = "String", description = "商品主图片")
    //@NotBlank(message = "商品主图片不能为空", groups = { AddGroup.class, EditGroup.class })
    private String spuImage;

    /**
     * 商品价格(单位分）
     */
    @Schema(title = "spuPrice", type = "Long", description = "商品价格(单位分）")
    //@NotNull(message = "商品价格(单位分）不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long spuPrice;

    /**
     * 商品数量
     */
    @Schema(title = "spuCount", type = "Integer", description = "商品数量")
    //@NotNull(message = "商品数量不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer spuCount;

    /**
     * 商品总价(单位分）
     */
    @Schema(title = "spuTotalAmount", type = "Long", description = "商品总价(单位分）")
    //@NotNull(message = "商品总价(单位分）不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long spuTotalAmount;

    /**
     * 附件
     */
    @Schema(title = "spuFile", type = "String", description = "附件")
    //@NotBlank(message = "附件不能为空", groups = { AddGroup.class, EditGroup.class })
    private String spuFile;

    /**
     * 评价状态(0待评价，已评价）
     */
    @Schema(title = "review", type = "String", description = "评价状态(0待评价，已评价）")
    private String review;


    /**
     * 派单开始时间
     */
    @Schema(title = "orderBeginTime", type = "Date", description = "派单开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date orderBeginTime;

    /**
     * 派单结束时间
     */
    @Schema(title = "orderEndTime", type = "Date", description = "派单结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date orderEndTime;

    /**
     * 最新订单标识
     * newOrder=1查询最新订单
     */
    @Schema(title = "newOrder", type = "String", description = "最新订单标识")
    private String newOrder;

    /**
     * 订单编号
     */
    @Schema(title = "orderNumber", type = "String", description = "订单编号")
    //@NotBlank(message = "订单编号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String orderNumber;

    /**
     * 服务类型
     */
    @Schema(title = "serviceType", type = "String", description = "服务类型")
    //@NotBlank(message = "服务类型不能为空", groups = { AddGroup.class, EditGroup.class })
    private String serviceType;

    /**
     * 联系电话
     */
    @Schema(title = "contactPhone", type = "String", description = "联系电话")
    //@NotBlank(message = "联系电话不能为空", groups = { AddGroup.class, EditGroup.class })
    private String contactPhone;

    /**
     * 是否已经支付 (0 未支付，1已支付）
     */
    @Schema(title = "payed", type = "String", description = "是否已经支付 (0 未支付，1已支付）")
    //@NotBlank(message = "是否已经支付 (0 未支付，1已支付）不能为空", groups = { AddGroup.class, EditGroup.class })
    private String payed;

    /**
     * 订单状态(Pending=待处理，Paid=已付款，Processing=处理中，Completed=已完成，Cancelled=已取消，Refunded=已退款）
     */
    @Schema(title = "orderStatus", type = "String", description = "订单状态(PENDING=待处理，Paid=已付款，Processing=处理中，Completed=已完成，Cancelled=已取消，Refunded=已退款）")
    //@NotBlank(message = "订单状态(PENDING=待处理，Paid=已付款，Processing=处理中，Completed=已完成，Cancelled=已取消，Refunded=已退款）不能为空", groups = { AddGroup.class, EditGroup.class })
    private String orderStatus;

    /**
     * 是否申请完成,0未申请，1已申请
     */
    @Schema(title = "processedStatus", type = "String", description = "是否申请完成,0未申请，1已申请")
    private String processedStatus;

    /**
     * 结单时间
     */
    @Schema(title = "finishedTime", type = "Date", description = "结单时间")
    private Date finishedTime;
}
